﻿using System;
using System.Collections.Generic;
using System.Text;

//为object(this)扩展日志方法
public static class PEUtilsExtension
{
    public static void Log(this object obj, object log)
    {
        PEUtils.PELog.Log(log);
    }
    public static void Log(this object obj, string msg, params object[] args)
    {
        PEUtils.PELog.Log(string.Format(msg, args));
    }
    public static void ColorLog(this object obj, PEUtils.LogColor color, object log)
    {
        PEUtils.PELog.ColorLog(color, log);
    }
    public static void ColorLog(this object obj, PEUtils.LogColor color, string msg, params object[] args)
    {
        PEUtils.PELog.ColorLog(color, string.Format(msg, args));
    }
    public static void Trace(this object obj, object log)
    {
        PEUtils.PELog.Trace(log);
    }
    public static void Trace(this object obj, string msg, params object[] args)
    {
        PEUtils.PELog.Trace(string.Format(msg, args));
    }
    public static void Warn(this object obj, object log)
    {
        PEUtils.PELog.Warn(log);
    }
    public static void Warn(this object obj, string msg, params object[] args)
    {
        PEUtils.PELog.Warn(string.Format(msg, args));
    }
    public static void Error(this object obj, string log)
    {
        PEUtils.PELog.Error(log);
    }
    public static void Error(this object obj, string msg, params object[] args)
    {
        PEUtils.PELog.Error(string.Format(msg, args));
    }
}
